/*
 * Parametros.java
 *
 * Created on 27 de julio de 2008, 03:45 PM
 */

package administrador;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
/**
 *
 * @author  Usuario
 */
public class Parametros extends javax.swing.JPanel {
    //Parametros:
    Conexion conexion;
    Usuario user;
    int bodega=0;
    
    //Variables para los Diferentes Parametros:
    String razonSocial="";
    String ruc="";
    String direccion="";
    String iva="";
    String autorizacion="";
    String fechaCad="";
    String puntosEmi="";
    String terminal="";
    String contribuyenteEsp="";
    String duenoRuc="";
    
    //ClientesFactura cfactura;
    
    /** Creates new form Parametros */
    public Parametros(Conexion cEnt,int BEnt,Usuario user) {
        bodega=BEnt;
       //System.out.println("La bodega en uso es:"+bodega);
        conexion=cEnt;
        initComponents();
        refrescar();
        
    }
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        txt_iva = new javax.swing.JTextField();
        txt_dir = new javax.swing.JTextField();
        txt_ruc = new javax.swing.JTextField();
        txt_rsocial = new javax.swing.JTextField();
        bt_modParametros = new javax.swing.JButton();
        cb_contr = new javax.swing.JComboBox();
        contenedor = new javax.swing.JTabbedPane();
        p_comprobantes = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        cb_tipo = new javax.swing.JComboBox();
        txt_secue = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        p_autorizacion = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        txt_aut = new javax.swing.JTextField();
        txt_fechaCad = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        lblRucD = new javax.swing.JLabel();
        txt_DRuc = new javax.swing.JTextField();

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24));
        jLabel1.setText("Parametros del Sistema");

        jLabel2.setText("Razon Social:");

        jLabel3.setText("RUC:");

        jLabel4.setText("Direccion:");

        jLabel5.setText("IVA %:");

        txt_iva.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt_ivaKeyTyped(evt);
            }
        });

        txt_ruc.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt_rucKeyTyped(evt);
            }
        });

        bt_modParametros.setText("Modificar");
        bt_modParametros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_modParametrosActionPerformed(evt);
            }
        });

        cb_contr.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "No es Contribuyente Especial", "Contribuyente Especial" }));

        p_comprobantes.setBorder(javax.swing.BorderFactory.createTitledBorder("Tipos de Comprobantes"));

        jLabel8.setText("Comienzo de Nueva Secuencia:");

        jLabel11.setText("Tipo de Comprobantes:");

        cb_tipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cb_tipoActionPerformed(evt);
            }
        });

        txt_secue.setEditable(false);

        jButton1.setText("Crear Nuevo Comprobante");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("historial");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout p_comprobantesLayout = new javax.swing.GroupLayout(p_comprobantes);
        p_comprobantes.setLayout(p_comprobantesLayout);
        p_comprobantesLayout.setHorizontalGroup(
            p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_comprobantesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(p_comprobantesLayout.createSequentialGroup()
                        .addGap(38, 38, 38)
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cb_tipo, 0, 257, Short.MAX_VALUE))
                    .addGroup(p_comprobantesLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, p_comprobantesLayout.createSequentialGroup()
                                .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1))
                            .addComponent(txt_secue, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE))))
                .addContainerGap())
        );
        p_comprobantesLayout.setVerticalGroup(
            p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_comprobantesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel11)
                    .addComponent(cb_tipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_secue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_comprobantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jButton2))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        contenedor.addTab("Comprobantes", p_comprobantes);

        jLabel6.setText("Autorizacion:");

        txt_aut.setEditable(false);

        txt_fechaCad.setEditable(false);

        jLabel7.setText("Fecha de Caducidad Aut:");

        jButton3.setText("Modificar Autorizacion");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout p_autorizacionLayout = new javax.swing.GroupLayout(p_autorizacion);
        p_autorizacion.setLayout(p_autorizacionLayout);
        p_autorizacionLayout.setHorizontalGroup(
            p_autorizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_autorizacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(p_autorizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(p_autorizacionLayout.createSequentialGroup()
                        .addGap(58, 58, 58)
                        .addComponent(jLabel6))
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_autorizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txt_aut, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
                    .addComponent(txt_fechaCad, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(46, 46, 46))
        );
        p_autorizacionLayout.setVerticalGroup(
            p_autorizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_autorizacionLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(p_autorizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txt_aut, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_autorizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel7)
                    .addComponent(txt_fechaCad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jButton3)
                .addContainerGap(21, Short.MAX_VALUE))
        );

        contenedor.addTab("Autorizacion", p_autorizacion);

        lblRucD.setText("Nombre");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
                .addGap(215, 215, 215))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(bt_modParametros))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(cb_contr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(53, 53, 53)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel3)
                                .addComponent(jLabel2)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblRucD)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel5)
                                        .addComponent(jLabel4))))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txt_DRuc, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
                                .addComponent(txt_rsocial, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
                                .addComponent(txt_ruc, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
                                .addComponent(txt_dir, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
                                .addComponent(txt_iva, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)))))
                .addGap(87, 87, 87))
            .addGroup(layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(contenedor)
                .addGap(20, 20, 20))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_rsocial, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(8, 8, 8)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblRucD)
                    .addComponent(txt_DRuc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_ruc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_dir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_iva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(cb_contr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(bt_modParametros)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(contenedor, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(27, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void bt_modParametrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_modParametrosActionPerformed
// TODO add your handling code here:
        ResultSet resp=conexion.consultarBase("SELECT * FROM parametros p;");
        int filas=conexion.obtenerFilas(resp);
        
        //Obtengo los datos de la ventana:
            razonSocial=this.txt_rsocial.getText();
            ruc=this.txt_ruc.getText();
            direccion=this.txt_dir.getText();
            iva=this.txt_iva.getText();
            duenoRuc=txt_DRuc.getText();
            
            int seleccion=cb_contr.getSelectedIndex();;
            if(seleccion==1){
            contribuyenteEsp="true";
            }else{
            contribuyenteEsp="false";
            }
           //System.out.println("Contribuyente:"+contribuyenteEsp);
            String fecha=new java.sql.Date(System.currentTimeMillis()).toString();
            
        //Creo si no existe:
        if (filas==0){
        conexion.insertarDatos("insert into parametros values(1,'"+razonSocial+"','"+ruc+"','"+direccion+"',"+iva+","+contribuyenteEsp+",null,'"+fecha+"','"+duenoRuc+"');");
        }
        
        
       //Modifico los parametros:
           //System.out.println("Los daos son:"+razonSocial+" "+ruc+" "+direccion+" "+iva+" "+puntosEmi+" "+terminal);
            if(razonSocial.equals("")||ruc.equals("")||direccion.equals("")||iva.equals("")){
             JOptionPane.showMessageDialog(this,"Los Productos no han sido llenado correctamente","Informacion",JOptionPane.INFORMATION_MESSAGE);
            }else{
             conexion.actualizarBase("update parametros set razon_Social='"+razonSocial+"', ruc='"+ruc+"', direccion='"+direccion+"', iva="+iva+", contribuyenteEsp="+contribuyenteEsp+",duenoRuc='"+duenoRuc+"' where codigo=1;");
            }
            refrescar();
        
}//GEN-LAST:event_bt_modParametrosActionPerformed

private void cb_tipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cb_tipoActionPerformed
        try {
// TODO add your handling code here:
            int seleccion = this.cb_tipo.getSelectedIndex();
            String texto = cb_tipo.getItemAt(seleccion).toString();
            String[] textoC = texto.split(" ");
            ResultSet r = conexion.consultarBase("select * from tipo_comprobante where idcodigo=" + textoC[0]);
            r.beforeFirst();
            r.next();
            int secu = r.getInt("num_secuencia");
            txt_secue.setText(String.valueOf(secu));
        } catch (Exception ex) {//GEN-LAST:event_cb_tipoActionPerformed
           // Logger.getLogger(Parametros.class.getName()).log(Level.SEVERE, null, ex);
        }
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
    Vent_CreaComprobantes vcc=new Vent_CreaComprobantes(conexion,user,this);
    
}//GEN-LAST:event_jButton1ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
// TODO add your handling code here:
    modAutorizacion mau=new modAutorizacion(conexion,user,this);
}//GEN-LAST:event_jButton3ActionPerformed

private void txt_rucKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_rucKeyTyped
// TODO add your handling code here:
    char c = evt.getKeyChar();
    if (!(Character.isDigit(c) || (c == java.awt.event.KeyEvent.VK_BACK_SPACE) || (c == java.awt.event.KeyEvent.VK_DELETE))) {
          getToolkit().beep();
          evt.consume();
          
    }
    String textoV=txt_ruc.getText();
    if(!(textoV.length()<13)){
     evt.consume();
    }
}//GEN-LAST:event_txt_rucKeyTyped

private void txt_ivaKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_ivaKeyTyped
// TODO add your handling code here:
    char c = evt.getKeyChar();
    if (!(Character.isDigit(c) || (c == java.awt.event.KeyEvent.VK_BACK_SPACE) || (c == java.awt.event.KeyEvent.VK_DELETE))) {
          getToolkit().beep();
          evt.consume();
          
    }
    String textoV=txt_iva.getText();
    if(!(textoV.length()<2)){
     evt.consume();
    }
}//GEN-LAST:event_txt_ivaKeyTyped

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
    histSecuencias hiSec=new histSecuencias(conexion,bodega,user);
}//GEN-LAST:event_jButton2ActionPerformed
    
    public void refrescar(){
        
    ResultSet respu=conexion.consultarBase("select * from parametros");
        
            try{
            respu.next();
            razonSocial=respu.getString(2);
            ruc=respu.getString(3);
            direccion=respu.getString(4);
            iva=String.valueOf(respu.getInt(5));
            contribuyenteEsp=String.valueOf(respu.getBoolean(8));
            duenoRuc=respu.getString("duenoRuc").toString();
            
            //Lleno los campos con los campos especificados:
            txt_rsocial.setText(razonSocial);
            txt_ruc.setText(ruc);
            txt_dir.setText(direccion);
            txt_iva.setText(iva);
            
            if(contribuyenteEsp.equals("true")){
            cb_contr.setSelectedIndex(1);
            } 
            txt_DRuc.setText(duenoRuc);
            //Actualizo los diferentes tipos de Comprobantes:
            ResultSet resp=conexion.consultarBase("select * from tipo_comprobante where cod_autorizacion=(select max(cod_auto) from autorizacion);");
            resp.beforeFirst();
            
            int cod_c=0;
            String nom_c="";
            Date fecha;
            int num_c=0;
            
            cb_tipo.removeAllItems();
            while(resp.next()){
            cod_c=resp.getInt("idcodigo");
            nom_c=resp.getString("nombre");
            fecha=resp.getDate("fecha");
            num_c=resp.getInt("num_secuencia");
            String etiqueta=String.valueOf(cod_c)+" "+nom_c;
            this.cb_tipo.addItem(etiqueta);
            this.txt_secue.setText(String.valueOf(num_c));
            }
            //cb_tipo.setSelectedIndex(1);
                    
            //Actualizo el ultimo numero de Autorizacion
            int codigo=0;
            java.sql.ResultSet rauto = conexion.consultarBase("select MAX(cod_auto) from autorizacion ;");
            rauto.beforeFirst();
            rauto.next();
            codigo=rauto.getInt(1);
            
            
            long numeroAuto=0;
            Date fechaCad;
            rauto=conexion.consultarBase("select * from autorizacion where cod_auto="+codigo);
            rauto.beforeFirst();
            rauto.next();
            numeroAuto=rauto.getLong("numero");
            fechaCad=rauto.getDate("fecha_fin");
            this.txt_fechaCad.setText(fechaCad.toString());
            this.txt_aut.setText(String.valueOf(numeroAuto));
            
            
            } catch (Exception ex) {
            ex.printStackTrace();
        }
            
        
    
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bt_modParametros;
    private javax.swing.JComboBox cb_contr;
    public javax.swing.JComboBox cb_tipo;
    private javax.swing.JTabbedPane contenedor;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel lblRucD;
    private javax.swing.JPanel p_autorizacion;
    public javax.swing.JPanel p_comprobantes;
    private javax.swing.JTextField txt_DRuc;
    private javax.swing.JTextField txt_aut;
    private javax.swing.JTextField txt_dir;
    private javax.swing.JTextField txt_fechaCad;
    private javax.swing.JTextField txt_iva;
    private javax.swing.JTextField txt_rsocial;
    private javax.swing.JTextField txt_ruc;
    public javax.swing.JTextField txt_secue;
    // End of variables declaration//GEN-END:variables
    
}
